import request from '@/config/axios'

export interface ProductsTypeVO {
  id: number
  no: string
  name: string
  status: number
}

// 查询相亲活动信息列表
export const getProductsTypePage = async (params) => {
  return await request.get({ url: `/activity/product-type/page`, params })
}

// 获得相亲套餐类型列表
export const getProductsTypeList = async (ids: number) => {
  return await request.get({ url: `/activity/product-type/list?ids=` + ids })
}

// 获得相亲套餐类型列表
export const getProductsTypeListAll = async () => {
  return await request.get({ url: `/activity/product-type/getMerchantTypeList` })
}

// 查询相亲活动信息详情
export const getProductsType = async (id: number) => {
  return await request.get({ url: `/activity/product-type/get?id=` + id })
}

// 新增相亲活动信息
export const createProductsType = async (data: ProductsTypeVO) => {
  return await request.post({ url: `/activity/product-type/create`, data })
}

// 修改相亲活动信息
export const updateProductsType = async (data: ProductsTypeVO) => {
  return await request.put({ url: `/activity/product-type/update`, data })
}

// 删除相亲活动信息
export const deleteProductsType = async (id: number) => {
  return await request.delete({ url: `/activity/product-type/delete?id=` + id })
}

// 导出相亲活动信息 Excel
export const exportProductsType = async (params) => {
  return await request.download({ url: `/activity/product-type/export-excel`, params })
}
